import {
    setCookie, getCookie, delCookie, isWeiXin, isAlipay, isQQ
} from '@a/js/mod/public';

function setPhone(phone) {
    return setCookie("mobile", phone);
}
function getPhone() {
    return getCookie("mobile");
}

function removePhone() {
    return delCookie("mobile");
}

function setUserName(name) {
    return setCookie("userName", name);
}
function getUserName() {
    return getCookie("userName");
}

function removeName() {
    return delCookie("userName");
}

function setToken(token) {
    return setCookie("token", token);
}
function getToken() {
    return getCookie("token");
}

function removeToken() {
    return delCookie("token");
}

function setHisLastUrl(url) {
    return setCookie("historyLastUrl", url);
}

function WeiXinEnv() {
    return isWeiXin();
}

function AlipayEnv() {
    return isAlipay();
}

function QQEnv() {
    return isQQ();
}

// isWeiXin, isAlipay, isQQ



export {
    setPhone,
    getPhone,
    setUserName,
    getUserName,
    setToken,
    getToken,
    removePhone,
    removeName,
    removeToken,
    setHisLastUrl,

    WeiXinEnv, AlipayEnv, QQEnv
}
